Skip to content

chore!: modernize for 3.0.0 (.NET 10/11, Amazon.CDK.Lib 2.278.0, Compono tests, devops-templates v11.2) - #113

Merged
ncipollina merged 21 commits into
mainfrom
chore/v3-modernization
Nov 24, 2026
Merged

ncipollina merged 21 commits into
mainfrom
chore/v3-modernization

Conversation

@ncipollina

Copy link
Copy Markdown
Contributor

Refs #109 · epic #108 · Beads cdkc-2lh.2 · supersedes #101

Modernizes the repository for 3.0.0 without changing any construct's synthesized output. Golden templates are byte-identical. It also adds the 3.0.0 design document, which is for owner review: approving it is a #109 acceptance item, and it does not authorize #110, #111 or #112.

Breaking changes

Intentional

  • .NET 8 and .NET 9 removed. The package and the tests target net10.0;net11.0. Consumers still on .NET 8 or 9 stay on 2.x.

Upgrade-induced (Amazon.CDK.Lib 2.274.0 → 2.278.0)

  • New CDK floor: 2.278.0.
  • Type-name collisions (source-only). 2.278.0 adds AWS's own L2 Web Function types to Amazon.CDK.AWS.Lambda, and eight of them share names with ours: IWebFunctionEndpoint, IWebFunctionEndpointOptions, WebFunctionCode, WebFunctionRuntime, WebFunctionAuthType, WebFunctionEndpointType, WebFunctionEndpointOptions and WebFunctionEndpointAttributes.
    • A consumer file that imports both namespaces gets CS0104 and needs a using alias.
    • Our public API is unchanged; the library itself uses file-local aliases.
    • Documented in the README and on the Web Function page.
  • Stricter jsii struct validation. The new jsii runtime now rejects two calls that passed a wider struct than declared, so they threw at synthesis. Fixed in ab2a58b; no output change:
    • Alias.AddFunctionUrl(FunctionUrlProps) → FunctionUrlOptions;
    • Distribution.AddBehavior(…, BehaviorOptions) → AddBehaviorOptions.

Changes

  • SDK: global.json pins 11.0.100 (latestFeature, no prerelease) and keeps the MTP runner.
  • Dependencies, all stable:
    • Amazon.CDK.Lib 2.278.0, Microsoft.SourceLink.GitHub 11.0.100, xunit.v3.mtp-v2 4.0.3;
    • Compono/Compono.XunitV3 1.4.0 added;
    • removed: AutoFixture, AutoFixture.AutoNSubstitute, AutoFixture.Xunit3, NSubstitute, Microsoft.NET.Test.Sdk, xunit.runner.visualstudio;
    • Microsoft.Testing.Extensions.CodeCoverage 18.12.0 and AwesomeAssertions 9.6.0 are already current;
    • VersionPrefix 3.0.0 (affects local builds only).
  • Tests (Compono-first):
    • the *AutoDataAttribute/BaseFixtureFactory/customizations are replaced by five composition profiles used through [Compose<TProfile, TConfig>];
    • incidental values (Lambda memory and timeout, Web Function log levels) are generated within valid ranges;
    • every assertion is kept: 595 tests per TFM before and after;
    • test execution is MTP-only, as in Jedi Duel.
  • Workflows:
    • devops-templates v10.8 → v11.2;
    • pr-build is now credential-free (contents: read, no secrets: inherit, runCdk removed, globalJsonFile);
    • .NET 10.0.x and 11.0.x;
    • setup-python v7.1.0 and setup-uv v10.4.0;
    • create-github-app-token v3.4.0 (SHA-pinned; the pull_request_target actor/repository guard is unchanged).
  • Docs: README, the docs site and CLAUDE.md updated for frameworks, the CDK floor, L1 vs L2 and the test stack. New docs/designs/v3-modernization.md.
  • Beads: the planning and execution beads are exported via the committed .beads/issues.jsonl convention.

Design document: decisions for the owner

docs/designs/v3-modernization.md covers the framework and dependency policy, the Release Drafter preview strategy, U1–U4/U7 (#110) and U6 (#111). §9 is the WebFunctionConstruct decision record:

  • It compares our L1-based construct with the AWS CDK 2.278.0 L2 across API, capabilities, resource ownership, IAM, logging, endpoints and synthesized templates, using a throwaway synthesis spike.
  • Recommendation: retain the current implementation for 3.0.0.
  • Proposed additional scope (needs your explicit approval): a gated spike toward composing over the L2 while preserving logical IDs and the endpoint name. The L2's default endpoint name (prod vs our default) and logical IDs would otherwise replace the endpoint and change its URL.

Versioning check (before merge)

  • publish-preview (v11.2) publishes <Release Drafter resolved>-preview.<run>.
  • Since v2.6.0, only chore(beads): record v2.6.0 release and close web-function epic #106 (type: chore) has merged. This PR carries breaking-change, so the major resolver gives 3.0.0 and the first preview after merge is 3.0.0-preview.N. The draft v2.6.1 does not drive resolution.
  • I'll confirm the actual version from the publish run after you merge.

Validation

Run locally on the final tree, after git clean -fdx:

Check Result
Baseline before changes 595 passed × 4 TFMs
dotnet build LayeredCraft.Cdk.Constructs.slnx -c Release 0 warnings, 0 errors
dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release -- --coverage net10.0 595/595, net11.0 595/595; line coverage 94.5%, branch 86.3% (threshold 80%)
Golden templates byte-identical (no diff under GoldenTemplates/)
CdkUpgradeGuard_* (part of the suite, required for any CDK bump) pass
actionlint .github/workflows/* clean
git grep AutoFixture|NSubstitute|net8.0|net9.0 over src, test, .github, props none

TDD:

  • Production changes are refactor-only: the suite and the goldens were green before and after.
  • The jsii struct fix was driven by the 18 failing tests after the CDK bump.
  • Workflows and docs are exempt as behavior-free; they got structural validation instead.

Not run: CI itself (it runs on this PR); IDE test discovery without the VSTest adapter (relying on the Jedi Duel MTP-only precedent).

How the work was done

  • Claude owned the foundation, the design, the integration and the review.
  • Two OpenCode workers (openrouter/deepseek/deepseek-v4.1-flash, OpenCode 1.19.3) worked in isolated worktrees:
    • workflows/docs, one correction round;
    • the Compono migration, one correction round.
  • Their required skill reads were verified from the session logs.

🤖 Generated with Claude Code

ncipollina and others added 21 commits November 23, 2026 21:27
Exports the 3.0.0 epic cdkc-2lh and its six children (#108-#112 and
the two owner gates) through the repository's committed issues.jsonl
convention. Existing records are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LambdaFunctionConstruct passed FunctionUrlProps to Alias.AddFunctionUrl and
StaticSiteConstruct passed BehaviorOptions to Distribution.AddBehavior. The
jsii runtime in Amazon.CDK.Lib 2.278.0 validates required struct members on
conversion, so both now throw (missing 'function' / 'origin'). Use
FunctionUrlOptions and AddBehaviorOptions, the declared parameter types.
Synthesized templates are unchanged (golden templates byte-identical).

Refs #109 (cdkc-2lh.2.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- TargetFrameworks net8.0;net9.0;net10.0;net11.0 -> net10.0;net11.0
- global.json pins SDK 11.0.100 (latestFeature, no prerelease); MTP runner kept
- Amazon.CDK.Lib 2.274.0 -> 2.278.0, Microsoft.SourceLink.GitHub 10.0.402 -> 11.0.100,
  xunit.v3.mtp-v2 3.2.2 -> 4.0.3, Microsoft.NET.Test.Sdk 18.11.0 -> 18.12.0,
  xunit.runner.visualstudio 3.1.5 -> 4.0.1; Compono/Compono.XunitV3 1.4.0
  added centrally for the test migration
- VersionPrefix 2.4.0 -> 3.0.0 (local builds; CI versions come from Release Drafter)
- Amazon.CDK.Lib 2.278.0 adds same-named Web Function types to
  Amazon.CDK.AWS.Lambda; file-local using aliases keep this library's
  public types unambiguous. Public API unchanged.

BREAKING CHANGE: .NET 8 and .NET 9 targets are removed; the Amazon.CDK.Lib
floor rises to 2.278.0.

Refs #109 (cdkc-2lh.2.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump all five devops-templates callers (pr-build, publish-preview,
publish-release, release-drafter, pr-title-check) plus both nuget-push
uses from v10.8 to v11.2. Adapt pr-build to the v11 inputs: drop the
deprecated runCdk and secrets: inherit, replace write-all with
contents: read, add globalJsonFile, and target 10.0.x/11.0.x only.
Bump docs.yml pins (setup-python v7.1.0, setup-uv v10.4.0) and the
dependabot-auto-merge pins (create-github-app-token v3.4.0,
fetch-metadata comment v3.1.0), keeping SHA pinning and guards.
Update the framework, SDK and CDK-floor statements in the README,
CLAUDE.md and the docs site: target .NET 10 and .NET 11, require
Amazon.CDK.Lib 2.278.0 or later, and note the SDK is pinned by
global.json (11.0.100, rollForward: latestFeature). Update the
`--framework net8.0` test examples to net10.0.
Replace the stale "e.g. net9, net11" / "release/net9" comment examples
with net11, matching the edit already applied in publish-preview.yaml.
State that the Web Function constructs are built directly on the
CloudFormation L1 resources, and that Amazon.CDK.Lib 2.278.0 also ships
its own L2 Web Function constructs (relationship deferred to the 3.0.0
design), replacing the now-false "L1-only" claims in web-function.md and
CLAUDE.md. Add a consumer disambiguation note for the type names shared
with Amazon.CDK.AWS.Lambda. Restore the unverified F3006 bullet to CDK
2.274.0. Move the pinned-SDK requirement out of the consumer
Requirements lists into the README development section.
- docs/designs/v3-modernization.md: framework, SDK and dependency policy,
  upgrade-induced changes from Amazon.CDK.Lib 2.278.0, Release Drafter preview
  strategy, Compono test stack, U1-U4/U7 and U6 designs, and the decision
  record comparing WebFunctionConstruct with the new AWS CDK L2 (synthesis
  spike evidence; recommendation and proposed follow-up need owner approval)
- README and Web Function page: IWebFunctionEndpoint also collides

Refs #109 (cdkc-2lh.2.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s; document the Compono test stack

- Directory.Packages.props: drop AutoFixture, AutoFixture.AutoNSubstitute,
  AutoFixture.Xunit3, NSubstitute (no longer referenced), Microsoft.NET.Test.Sdk
  and xunit.runner.visualstudio
- Test project runs MTP-only (xunit.v3.mtp-v2, global.json test runner), as
  Jedi Duel already does; dotnet test --solution: 595 passed per TFM
- CLAUDE.md: Compono profiles and test-data strategy replace the AutoFixture text

Refs #109 (cdkc-2lh.2.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ncipollina ncipollina added this to the v3.0.0 milestone Nov 24, 2026
@ncipollina ncipollina added the breaking-change Introduces a breaking change label Nov 24, 2026
@ncipollina

Copy link
Copy Markdown
Contributor Author

@codex review

Focus areas:

  1. No construct output change: confirm that nothing under src/ changes synthesized CloudFormation. That covers the FunctionUrlOptions/AddBehaviorOptions fix and the file-local using aliases for the Amazon.CDK.Lib 2.278.0 type collisions. The golden templates must stay byte-identical.
  2. Compono test migration (test/**/TestKit/Profiles): no lost assertions or scenarios compared with the removed AutoFixture customizations, and the [Compose<TProfile, TConfig>] flag mapping matches each old attribute's arguments.
  3. Workflows on devops-templates v11.2: least-privilege pr-build permissions; the dependabot pull_request_target guard is unchanged; the publish workflows still produce 3.0.0-preview.N via Release Drafter.
  4. docs/designs/v3-modernization.md §9: whether the factual comparison of WebFunctionConstruct with the CDK L2 is accurate.

@github-actions github-actions Bot added the type: chore Maintenance task label Nov 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T03:41:48.723977Z d8e7608 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: d8e76089e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ncipollina
ncipollina merged commit 53607ea into main Nov 24, 2026
11 checks passed
@ncipollina
ncipollina deleted the chore/v3-modernization branch November 24, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change type: chore Maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant